<template>
  <a-card :bordered="false">
    <div>
      <a-form @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :md="12" :sm="12">
            <a-form-item label="姓名" :label-col="labelCol" :wrapper-col="wrapperCol">
              <a-input v-model="queryParam.name" placeholder="请输入姓名" />
            </a-form-item>
          </a-col>
          <a-col :md="12" :sm="12">
            <a-form-model-item label="学校类别" :label-col="labelCol" :wrapper-col="wrapperCol" >
              <z-dict-select-tag v-model="queryParam.schoolType"  dictCode="TALENT_SCHOOL_TYPE"/>
            </a-form-model-item>
          </a-col>
          <a-col :md="12" :sm="12">
            <a-form-model-item label="是否豫籍" :label-col="labelCol" :wrapper-col="wrapperCol" >
              <z-dict-select-tag v-model="queryParam.heNanRen"  dictCode="YESNO"/>
            </a-form-model-item>
          </a-col>
          <a-col :md="12" :sm="8">
            <a-form-item>
              <a-button type="primary" icon="search" @click="searchQuery()">查询</a-button>
              <a-button type="primary" icon="reload" style="margin-left: 8px" @click="searchReset()">重置</a-button>
            </a-form-item>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <vxe-grid
        id="TesteeList"
        ref="vxeTable"
        :row-config="{keyField:'id'}"
        v-bind="options"
        v-on="listeners"
    >
      <template #action="{ row }">
        <a @click="handleDetail(row)">详情</a>
      </template>
    </vxe-grid>
    <TalentModal @ok="modalFormOk" ref="modalForm" />
  </a-card>
</template>

<script>
import { VxeTableMixin } from '@/mixins/VxeTableMixin'
import ZDictSelectTag from '@/components/dict/ZDictSelectTag'
import TalentModal from './modules/TalentModal'
export default {
  name: 'TalentList',
  mixins: [VxeTableMixin],
  components: {
    TalentModal,
    ZDictSelectTag
  },
  data() {
    return {
      columns: [
        { type: 'checkbox', width: 40, fixed: 'left' },
        { type: 'seq', width: 40, fixed: 'left' },
        { title: '简历名称', field: 'resumeName',width: 250 },
        { title: '简历类型', field: 'resumeTypeStr',width: 200 },
        { title: '简历语言', field: 'lanTypeStr',width: 150 },
        { title: '姓名', field: 'name', width: 100 },
        { title: '性别', field: 'personalInfo.sexStr',width: 150 },
        { title: '身份证号', field: 'personalInfo.idNumber',width: 150 },
        { itle: '出生日期', field: 'personalInfo.birthday',width: 150 },
        { title: '手机号', field: 'personalInfo.phone',width: 150 },
        { title: '民族', field: 'personalInfo.nation',width: 300 },
        { title: '政治面貌', field: 'personalInfo.political',width: 200 },
        { title: '婚姻状况', field: 'personalInfo.maritalStatusStr',width: 200 },
        { title: '外语及水平', field: 'personalInfo.foreignLanguage',width: 200 },
        { title: '第一学历', field: 'firstDegree',width: 200 },
        { title: '最高学历', field: 'highestDegree',width: 200 },
        { title: '学校类别', field: 'schoolType',width: 200, formatter: 'dictText' },
        { title: '户口所在地', field: 'personalInfo.homeTown',width: 500},
        { title: '驾照', field: 'personalInfo.driverLicense',width: 200 },

        { title: '操作', field: 'operation', width: 60, fixed: 'right', slots: { default: 'action' }}
      ],
      url: {
        list: '/talent/resume/v1/page'
      },
      customTableToolbar: {
        buttons: [
        ]
      },
      isorter: {
        fieldName: 'orginalCreateTime',
        desc: true
      }
    }
  }
}
</script>
